Builder
public abstract class Builder
Constructor Summary | |
---|---|
void | __construct(Connection connection) 架构函数 |
Method Summary | |
---|---|
void | 设置当前的Query对象实例 |
protected string | parseSqlTable(string sql) 将SQL语句中的__TABLE_NAME__字符串替换成带前缀的表名(小写) |
protected array | parseData(array data, array options) 数据分析 |
protected string | parseKey(string key, array options) 字段名分析 |
protected string|array | parseValue(mixed value, string field) value分析 |
protected string | parseField(mixed fields, array options) field分析 |
protected string | parseTable(mixed tables, array options) table分析 |
protected string | parseWhere(mixed where, array options) where分析 |
string | buildWhere(mixed where, array options) 生成查询条件SQL |
protected void | parseWhereItem(mixed field, mixed val, str rule, mixed options, mixed binds, mixed bindName) |
protected void | parseClosure(mixed call, bool show) |
protected string | parseDateTime(string value, string key, array options, string bindName, integer bindType) 日期时间条件解析 |
protected string | parseLimit(mixed lmit, mixed limit) limit分析 |
protected string | parseJoin(array join, array options) join分析 |
protected string | parseOrder(mixed order, array options) order分析 |
protected string | parseGroup(mixed group) group分析 |
protected string | parseHaving(string having) having分析 |
protected string | parseComment(string comment) comment分析 |
protected string | parseDistinct(mixed distinct) distinct分析 |
protected string | parseUnion(mixed union) union分析 |
protected string | parseForce(mixed index) index分析,可在操作链中指定需要强制使用的索引 |
protected string | parseLock(bool locl, bool lock) 设置锁机制 |
string | select(array options) 生成查询SQL |
string | insert(array data, array options, bool replace) 生成insert SQL |
string | insertAll(array dataSet, array options) 生成insertall SQL |
string | selectInsert(array fields, string table, array options) 生成slectinsert SQL |
string | update(array fields, array options, mixed data) 生成update SQL |
string | delete(array options) 生成delete SQL |
public void __construct(Connection connection)
架构函数
public void setQuery(Query query)
设置当前的Query对象实例
protected string parseSqlTable(string sql)
将SQL语句中的__TABLE_NAME__字符串替换成带前缀的表名(小写)
protected array parseData(array data, array options)
数据分析
protected string parseKey(string key, array options)
字段名分析
protected string|array parseValue(mixed value, string field)
value分析
protected string parseField(mixed fields, array options)
field分析
protected string parseTable(mixed tables, array options)
table分析
protected string parseWhere(mixed where, array options)
where分析
public string buildWhere(mixed where, array options)
生成查询条件SQL
protected void parseWhereItem(mixed field, mixed val, str rule, mixed options, mixed binds, mixed bindName)
protected void parseClosure(mixed call, bool show)
protected string parseDateTime(string value, string key, array options, string bindName, integer bindType)
日期时间条件解析
protected string parseLimit(mixed lmit, mixed limit)
limit分析
protected string parseJoin(array join, array options)
join分析
protected string parseOrder(mixed order, array options)
order分析
protected string parseGroup(mixed group)
group分析
protected string parseHaving(string having)
having分析
protected string parseComment(string comment)
comment分析
protected string parseDistinct(mixed distinct)
distinct分析
protected string parseUnion(mixed union)
union分析
protected string parseForce(mixed index)
index分析,可在操作链中指定需要强制使用的索引
protected string parseLock(bool locl, bool lock)
设置锁机制
public string select(array options)
生成查询SQL
public string insert(array data, array options, bool replace)
生成insert SQL
public string insertAll(array dataSet, array options)
生成insertall SQL
public string selectInsert(array fields, string table, array options)
生成slectinsert SQL
public string update(array fields, array options, mixed data)
生成update SQL
public string delete(array options)
生成delete SQL